package com.mj;

/**
 * 病人
 */
public class Person implements Comparable{
    private String name;
    //断的骨头数量
    private int boneBreak;

    public Person(String name, int boneBreak) {
        this.name = name;
        this.boneBreak = boneBreak;
    }

    @Override
    public int compareTo(Object o) {
        return this.boneBreak - ((Person)o).boneBreak;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", boneBreak=" + boneBreak +
                '}';
    }


}
